<?php
	include_once 'isLogin.php';
	
	//登陆者资料
	$key = "*,(select group_name from admin_groups where id=admin.group_id) as group_name";
	$admin = $commonc->getInfo("admin",$_COOKIE['admin_id'],$key);
	$admin['ip']=$_SERVER['REMOTE_ADDR'];
	$smarty->assign("admin",$admin);
	
	//管理员分组
	$key = "group_name,(select count(*) from admin where group_id=admin_groups.id) as num";
	$sql = "admin_groups";
	$group_num = $commonc->getList($sql,'',$key);
	$smarty->assign("group_num",$group_num['result']);
	
	//用户数量
	$sql="users";
	//今日注册用户
	$num4=$commonc->getNum($sql." where reg_date like '".date("Y-m-d")."%'");
	$smarty->assign("num4",$num4);
	//用户总数
	$num5=$commonc->getNum($sql);
	$smarty->assign("num5",$num5);
	
	$smarty->display("right.html");
?>